{include file=buyer.header.html}
<script type="text/javascript">
$(function(){
    $("form").submit( function () {
        if($("#evaluateR").val() == '')
        {
           alert("请填写商品评价的内容!"); 
           return false; 
        }
    } );       
   
});
	var xingxing={
		d:['非常不满意','不满意','比较满意','满意','非常满意'],
		go:function(o){
			var i=$(o);
			var div=$(o).parent();
			var input=div.siblings('input');
			var p=div.siblings('p');
			var index=0;
			div.children().each(function(j){
				index=div.children().index(i);
				if(j>index){
					$(this).removeClass('active');
				}else{
					$(this).addClass('active');
				}
			});
			input.val(index+1);
			p.html(xingxing.d[index]);
		}
	};
	</script>
<!-- 内容 -->
<div class="content">
  <!-- 当前位置 -->
  {include file=path.html}
  <dl class="buyer-evaluate">
    <dd>
    <!--{if $comment}-->
      <form action="" method="post">
        <div class="bedwrap">
          <div class="bedt">
            <h3>商品评价</h3>
          </div>
          <table width="100%" class="bedtable" style="border: none;">
            <tr>
              <td width="170" valign="top"><div class="goods-show-img"> <img src="{$comment.goods_image}" alt="" height="100"></div></td>
              <td width="190" valign="top"><p class="pa"><a class="linkbtn" href="{jsurl app=goods&id=$comment.goods_id}">{$comment.goods_name|escape}</a></p></td>
              <td width="180"  valign="top" align="center">
              <div class="xingxing f-cb">
                <!--{if $comment.evaluation gt 0}--><i class="active" onmouseover="xingxing.go(this)"></i><!--{/if}-->
                <!--{if $comment.evaluation gt 1}--><i class="active" onmouseover="xingxing.go(this)"></i><!--{/if}-->
                <!--{if $comment.evaluation gt 2}--><i class="active" onmouseover="xingxing.go(this)"></i><!--{/if}-->
                <!--{if $comment.evaluation gt 3}--><i class="active" onmouseover="xingxing.go(this)"></i><!--{/if}-->
                <!--{if $comment.evaluation gt 4}--><i class="active" onmouseover="xingxing.go(this)"></i><!--{/if}-->
                <!--{if $comment.evaluation lt 5}--><i onmouseover="xingxing.go(this)"></i><!--{/if}-->                
                <!--{if $comment.evaluation lt 4}--><i onmouseover="xingxing.go(this)"></i><!--{/if}-->
                <!--{if $comment.evaluation lt 3}--><i onmouseover="xingxing.go(this)"></i><!--{/if}-->
                <!--{if $comment.evaluation lt 2}--><i onmouseover="xingxing.go(this)"></i><!--{/if}-->
                <!--{if $comment.evaluation lt 1}--><i onmouseover="xingxing.go(this)"></i><!--{/if}-->               
               </div>
                <p class="xinginfo">非常满意</p>
                <input type="hidden" name="evaluation" value="{$comment.evaluation}" /></td>
              <td valign="top" align="right" class="evaluateR"><ul>
                  <li>
                    <div class="valid-d">                  
                      <textarea name="comment" id="evaluateR" onfocus="wl.focusInput(this)" onblur="wl.blurInput(this)">{$comment.comment|escape}</textarea>
                    
                    </div>
                  </li>
                </ul></td>
            </tr>
          </table>
        </div>
        <div class="bedsub">
          <input type="submit" value="修改评论" class="subbtnhsb" />
        </div>
      </form>
      <!--{/if}-->
    </dd>
  </dl>
</div>
<!-- 页脚 -->
{include file=footer.html}